﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Directory.Web.Admin_Default"
    Theme="Admin_Default" Codebehind="Default.aspx.cs" %>

<%@ Register Src="~/Admin/Controls/ItemView.ascx" TagPrefix="admin" TagName="ItemView" %>
<%@ Register Src="~/Admin/Controls/CategoryView.ascx" TagPrefix="admin" TagName="CategoryView" %>
<%@ Register Src="~/Admin/Controls/Security.ascx" TagPrefix="admin" TagName="Security" %>
<%@ Register Src="~/Admin/Controls/SiteSettings.ascx" TagPrefix="admin" TagName="SiteSettings" %>
<%@ Register Src="~/Admin/Controls/MessageBoard.ascx" TagPrefix="admin" TagName="MessageBoard" %>
<%@ Register Src="~/Admin/Controls/Manual.ascx" TagPrefix="admin" TagName="Manual" %>
<%@ Register Src="~/Admin/Controls/UserInfo.ascx" TagPrefix="admin" TagName="UserInfo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>后台管理</title>
    <style>
        #header
        {
            height: 72px;
            clear: both;
            background-color: #00468C;
            vertical-align: middle;
        }
        #header img
        {
            display: block;
            float: left;
        }
        #nav
        {
            float: right;
            margin: 20px;
        }
        #nav ul li
        {
            display: block;
            float: left;
            padding: 5px 10px;
        }
        #nav a
        {
            color: White;
            text-decoration: none;
        }
        #nav a:hover
        {
            color: #FFAA00;
            text-decoration: underline;
        }
        #body
        {
            width: 100%;
        }
        #browser
        {
            width: 20%;
            float: left;
            height: 100%;
            overflow: hidden;
        }
        #detail
        {
            width: 80%;
            float: left;
            height: 100%;
            overflow: hidden;
        }
        .inner
        {
            height: 100%;
        }
        #browser .inner
        {
            overflow: auto;
        }
        #detail iframe
        {
            width: 100%;
        }
    </style>

    <script type="text/javascript" src="../JS/jquery-1.3.2.min.js"></script>

    <script type="text/javascript">
        var contentUrl = "Manual.aspx";
        function SetFrame(url) {
            contentUrl = url;
        }
    </script>

</head>
<body id="page">
    <form id="form1" runat="server">
    <div id="header">
        <img alt="logo" src="/imgs/logo_admin.gif" />
        <admin:UserInfo ID="UserInfo" runat="server" />
        <div id="nav">
            <ul class="menu_ul">
                <li class="menu_li"><a href="Default.aspx?type=itemview">
                    <% =Resources.Resource.ResourceManager.GetString("Item") %>管理</a> </li>
                <li class="menu_li"><a href="Default.aspx?type=categoryview">
                    <% =Resources.Resource.ResourceManager.GetString("Category") %>管理</a> </li>
                <li class="menu_li"><a href="Default.aspx?type=messageboard">留言管理</a> </li>
                <li class="menu_li"><a href="Default.aspx?type=security">权限管理</a> </li>
                <li class="menu_li"><a href="Default.aspx?type=sitesettings">站点管理</a> </li>
                <li class="menu_li"><a href="Default.aspx?type=manual">帮助</a> </li>
            </ul>
        </div>
    </div>
    <div id="body">
        <div id="browser">
            <div class="inner">
                <admin:ItemView ID="ItemView" runat="server" Target="frmContent" />
                <admin:CategoryView ID="CategoryView" runat="server" Target="frmContent" />
                <admin:MessageBoard ID="MessageBoard" runat="server" Target="frmContent" />
                <admin:Security ID="Security" runat="server" Target="frmContent" />
                <admin:SiteSettings ID="SiteSettings" runat="server" Target="frmContent" />
                <admin:Manual ID="Manual" runat="server" Target="frmContent" />
            </div>
        </div>
        <div id="detail">
            <div class="inner">
                <iframe id="frmContent" name="frmContent" frameborder="0" width="100%" height="100%">
                </iframe>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        function SetSize() {
            try {
                $("#body").height($(window).height() - $("#header").height() - 20);
                $("#frmContent").height($("#detail").height());
            } catch (e) {
            }
        }
        $(window).resize(SetSize);
        SetSize();
        document.getElementById("frmContent").setAttribute("src", contentUrl);
//        $("#frmContent")[0].src(contentUrl);
    </script>

    </form>
</body>
